import { GetDetailImages } from "../../../model/detail_machine"
Page({
  data: {
    imaArr: [],
    isLoading: {
      type: Boolean,
      value: true
    }
  },
  onShow() {
    const $ele1 = this.selectComponent('#loading-img');
    this.setLoadingStatus($ele1);
  },
  onLoad() {
    this.setData({
      imaArr: GetDetailImages()
    })
    console.log(this.data.imaArr)
  },
  Navigateback() {
    wx.navigateBack({
      delta: 1
    });
  },
  setLoadingStatus(ele) {
    console.log(ele);
    ele.onLoadError = null;
    ele.onLoaded = this.onLoadSuccess;
    ele.setData({
      isLoading: true,
      isFailed: false,
    });
  },
  onLoadSuccess() {
    this.setData({
      isLoading: false
    })
  },
})